import request from '@/utils/request'
import { transFormValue } from '@/utils/tools'

//获取任务的用户列表
export function collectionGetUserList(data) {
  return request({
    url: '/collection/getUserList' + transFormValue(data),
    method: 'post'
  })
}


// 任务列表
export function collectionGetlist(data) {
  return request({
    url: '/collection/getList' + transFormValue(data),
    method: 'post'
  })
}

// 任务删除
export function collectionDelete(data) {
  return request({
    url: '/collection/delete' + transFormValue(data),
    method: 'post'
  })
}

//创建任务
export function collectionCreateTask(data) {
  return request({
    url: '/collection/createTask' + transFormValue(data),
    method: 'post'
  })
} 

// 编辑任务
export function collectionUpdate(data) {
  return request({
    url: '/collection/update' + transFormValue(data),
    method: 'post'
  })
}

//任务完成情况
export function collectionGetPersonList(data) {
  return request({
    url: '/collection/getPersonList' + transFormValue(data),
    method: 'post'
  })
}


//从公海领取
export function collectionTakePersonsFromPublic(data) {
  return request({
    url: '/collection/takePersonsFromPublic' + transFormValue(data),
    method: 'post'
  })
}


//添加客户
export function collectionAddPersonsToAddressBook(data) {
  return request({
    url: '/collection/addPersonsToAddressBook' + transFormValue(data),
    method: 'post'
  })
}





